<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<div id="buy-1" data-group="1">客服1</div>
</body>
<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="http://kefu.baolanbb.com/static/admin/js/content.min.js?v=1.0.0"></script>
<script src="http://kefu.baolanbb.com/static/customer/js/layer/layer.js"></script>
<script src="http://kefu.baolanbb.com/static/customer/js/whisper-tool.js"></script>

<script>
    var ws = new whisper();
    var uid = parseInt(Math.random() * 40) + 1;
    $("#buy-1,#buy-2").click(function(){
        var group = $(this).attr('data-group');
        ws.init({
            id: uid,
            whisper_domain: 'http://kefu.baolanbb.com/index/index/chat',
            name: '会员' + uid,
            avatar: 'http://wx2.sinaimg.cn/mw690/5db11ff4gy1flxmew7edlj203d03wt8n.jpg',
            group: group
        });
    });
</script>
</html>